/**
 * @description product controller
 * @author boen
 */

const Product = require('../models/Product')

/**
 * 获取商品列表
 * @param {string} shopId 商店id
 * @param {Array} productsId 商品列表 id
 * @returns 
 */
async function getProductList(shopId, productsId) {
    const productList = await Product.find({
        shopId,
        _id: {
            $in: productsId
        }
    })
    return productList
}

module.exports = {
    getProductList
}